#!/usr/bin/env python
# coding: utf-8

# In[1]:


np.random.seed(1)
X = np.random.randint(1, 10, size=30)


# In[2]:


import numpy as np


# In[3]:


np.random.seed(1)
X = np.random.randint(1, 10, size=30)


# In[4]:


X


# In[5]:


np.random.randint(1, 10, size=30)


# In[6]:


np.random.randint(1, 10, size=30)


# In[7]:


X


# In[8]:


X.reshape(3:-1)


# In[9]:


X.reshape(3,-1)


# In[10]:


X.reshape(-1:3)


# In[11]:


X.reshape(-1,3)


# In[12]:


X=X.reshape(-1,3)


# In[13]:


X.coloumn


# In[14]:


X[:,2]


# In[15]:





# In[16]:


X>1


# In[17]:


X[X[:,2]>3]=0


# In[18]:


X


# In[19]:


np.random.seed(1)


# In[20]:


X


# In[21]:


X = np.random.randint(1, 10, size=30)


# In[22]:


X


# In[23]:


X[:,2]<3 =0


# In[24]:


X[X[:,2]<3] 


# In[25]:


X[X[:2]<3] 


# In[26]:


X[:,2]<3 


# In[27]:


X=X.reshape(-1,3)
X[:,2]<3 


# In[28]:


X


# In[29]:


X[X[:,2]<] =0 


# In[30]:


X[X[:,2]<=3] =0 


# In[31]:


X


# In[32]:


np.random.seed(1)
X = np.random.randint(1, 10, size=30)
X=X.reshape(-1,3)


# In[33]:


X


# In[34]:


X[X[:,2]<=3] 


# In[35]:


X[:,X[:,2]<=3] 


# In[36]:


X[X[:,2]<=3,2]


# In[37]:


X[X[:,2]<=3,2]=0


# In[38]:


X


# In[39]:


X[3<X[:,2]<=6,2]=0


# In[40]:


np.where()


# In[41]:


np.where(X)


# In[42]:


np.where(X[:,2]>3)


# In[43]:


X[:,2]<=6 & X[:,2]>3


# In[44]:


X[:,2]<=6 and X[:,2]>3


# In[45]:


np.where(X > 3)


# In[46]:


X


# In[47]:


()X[:,2]<=6) & (X[:,2]>3)


# In[48]:


(X[:,2]<=6) & (X[:,2]>3)


# In[49]:


X[X[:,2]<=6) & (X[:,2]>3),2]


# In[50]:


X[(X[:,2]<=6) & (X[:,2]>3),2]


# In[51]:


X[(X[:,2]<=6) & (X[:,2]>3),2]=0


# In[52]:


X


# In[53]:


np.random.seed(1)
X = np.random.randint(1, 10, size=30)
X=X.reshape(-1,3)


# In[54]:


X[(X[:,2]<=6) & (X[:,2]>3),2]=1


# In[55]:


X


# In[56]:


np.random.seed(1)
X = np.random.randint(1, 10, size=30)
X=X.reshape(-1,3)


# In[57]:


X[X[:,2]<=3] =0 


# In[58]:


X[(X[:,2]<=6) & (X[:,2]>3),2]=1


# In[59]:


X


# In[60]:


X[X[:,2]>6] =2 


# In[61]:


X


# In[62]:


np.random.seed(1)
X = np.random.randint(1, 10, size=30)
X=X.reshape(-1,3)
X[X[:,2]<=3,2] =0 
X[(X[:,2]<=6) & (X[:,2]>3),2]=1
X[X[:,2]>6,2] =2 


# In[63]:


X


# In[64]:


X_train = X[,0:1]


# In[65]:


X_train = X[:,0:1]


# In[66]:


X_train


# In[67]:


X_train = X[:,0:2]


# In[68]:


y_train = X[:,2]


# In[69]:


y_train


# In[70]:


y_train ==


# In[71]:


y_train ==0


# In[72]:


X[y_train ==]


# In[73]:


X[y_train ==]


# In[74]:


X[y_train ==0]


# In[75]:


X_train_0=X[y_train ==0]


# In[76]:


X_train_0=X[y_train ==0]
X_train_1=X[y_train ==1]
X_train_2=X[y_train ==2]


# In[77]:


X_train_2


# In[ ]:




